package com.gxa.order.controller;/*
 *Created by${妄也} on 2022/10/6
 */

import com.gxa.common.commons.JsonResult;

import com.gxa.common.commons.R;
import com.gxa.order.pojo.AccommodationComments;
import com.gxa.order.service.accommodationServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@RestController
@RequestMapping("/accommodation")
public class accommodation {
    @Autowired
    private accommodationServer accommodationServer;

    @PostMapping("/findcomments")
    public JsonResult findcomments(@RequestBody HashMap map){

        System.out.println(map.toString());
        return accommodationServer.findcomments(map);
    }
    @PostMapping("/addcomments")

    public R addcomments(AccommodationComments accommodationComments){

        return accommodationServer.addcomments(accommodationComments);
    }
    @GetMapping("/updatacomments")
    public R updatacomments(String ID, String status ){

        return accommodationServer.updatacomments(ID,status);
    }

}
